<ul id = "list-toolbar">
	<li><?php echo $html->link(__('Thêm chủ điểm', true), array('action'=>'add')); ?></li>
</ul>

<div class="categories index">
<?php $session->flash();?>
<h2><?php __('Danh sách chủ điểm');?></h2>
<table cellpadding="0" cellspacing="0" border="1" width="80%">
<tr>
	<th><?php echo $paginator->sort('Tên');?></th>
	<th class="actions"><?php __('');?></th>
</tr>
<?php foreach ($categories as $category):?>
	<tr>
		<td>
			<div style="margin-left: 5px;">
				<?php
					$spaceAlowLevel = str_repeat('-', $category['Category']['level']-1);
					echo $html->link(__(' '.$spaceAlowLevel.' '.$category['Category']['name'], true), array('action'=>'edit', $category['Category']['id']));
				?>
			</div>
		</td>
		<td class="actions" align="center">
			<?php echo $html->link(__('Delete', true), array('action'=>'delete', $category['Category']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $category['Category']['name'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>